
Obj/apt32f172_initial.o:     file format elf32-csky-little


Disassembly of section .text:

00000000 <delay_nms>:
//software delay
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/	
void delay_nms(unsigned int t)
{
   0:	1423      	subi      	sp, sp, 12
    volatile unsigned int i,j ,k=0;
   2:	3300      	movi      	r3, 0
   4:	b862      	st.w      	r3, (sp, 0x8)
    j = 50* t;
   6:	3332      	movi      	r3, 50
   8:	7c0c      	mult      	r0, r3
   a:	b801      	st.w      	r0, (sp, 0x4)
    for ( i = 0; i < j; i++ )
   c:	3300      	movi      	r3, 0
   e:	b860      	st.w      	r3, (sp, 0)
  10:	9840      	ld.w      	r2, (sp, 0)
  12:	9861      	ld.w      	r3, (sp, 0x4)
  14:	64c8      	cmphs      	r2, r3
  16:	0c03      	bf      	0x1c	// 1c <delay_nms+0x1c>
    {
        k++;
    }
}
  18:	1403      	addi      	sp, sp, 12
  1a:	783c      	rts
        k++;
  1c:	9862      	ld.w      	r3, (sp, 0x8)
  1e:	2300      	addi      	r3, 1
  20:	b862      	st.w      	r3, (sp, 0x8)
    for ( i = 0; i < j; i++ )
  22:	9860      	ld.w      	r3, (sp, 0)
  24:	2300      	addi      	r3, 1
  26:	07f4      	br      	0xe	// e <delay_nms+0xe>

00000028 <GPIO_CONFIG>:
//GPIO Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void GPIO_CONFIG(void)
{
  28:	14d1      	push      	r4, r15
	GPIO_Init(GPIOA0,12,0);							//PA0.12 输出模式
  2a:	0383      	lrw      	r4, 0	// 298 <GPT_CONFIG+0x8c>
  2c:	3200      	movi      	r2, 0
  2e:	9400      	ld.w      	r0, (r4, 0)
  30:	310c      	movi      	r1, 12
  32:	e0000000 	bsr      	0	// 0 <GPIO_Init>
	
	GPIO_Write_High(GPIOA0,12);						//PA0.12 输出高	
  36:	9400      	ld.w      	r0, (r4, 0)
  38:	310c      	movi      	r1, 12
  3a:	e0000000 	bsr      	0	// 0 <GPIO_Write_High>
//------------  EXI FUNTION  --------------------------------/
//EXI0_INT= EXI0,EXI1_INT= EXI1, EXI2_INT=EXI2~EXI3, EXI3_INT=EXI4~EXI9, EXI4_INT=EXI10~EXI15    
	GPIO_Init(GPIOA0,0,1);							//PA0.00 输入模式, 下面配置为下降沿外部中断方式
  3e:	3201      	movi      	r2, 1
  40:	3100      	movi      	r1, 0
  42:	9400      	ld.w      	r0, (r4, 0)
  44:	e0000000 	bsr      	0	// 0 <GPIO_Init>
						
	GPIO_IntGroup_Set(PA0);							//外部中断选GPIOA0组
  48:	3000      	movi      	r0, 0
  4a:	e0000000 	bsr      	0	// 0 <GPIO_IntGroup_Set>
	
	EXTI_trigger_CMD(ENABLE,EXI_PIN0,_EXIFT);       //PA0.0下降沿中断
  4e:	3201      	movi      	r2, 1
  50:	3101      	movi      	r1, 1
  52:	3001      	movi      	r0, 1
  54:	e0000000 	bsr      	0	// 0 <EXTI_trigger_CMD>
	EXTI_interrupt_CMD(ENABLE,EXI_PIN0);            //使能EXI0中断
  58:	3101      	movi      	r1, 1
  5a:	3001      	movi      	r0, 1
  5c:	e0000000 	bsr      	0	// 0 <EXTI_interrupt_CMD>
	
	GPIO_EXTI_interrupt(GPIOA0,EXI_PIN0);			//使能PA0.0做外部中断
  60:	9400      	ld.w      	r0, (r4, 0)
  62:	3101      	movi      	r1, 1
  64:	e0000000 	bsr      	0	// 0 <GPIO_EXTI_interrupt>
	
	EXI0_Int_Enable();                              //使能EXI0中断向量
  68:	e0000000 	bsr      	0	// 0 <EXI0_Int_Enable>
	EXI0_WakeUp_Enable();							//使能EXI0中断唤醒
  6c:	e0000000 	bsr      	0	// 0 <EXI0_WakeUp_Enable>
}
  70:	1491      	pop      	r4, r15

00000072 <CORET_CONFIG>:
//CORET Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void CORET_CONFIG(void)
{
  72:	14d0      	push      	r15
	CORET_DeInit();									//Coret 所有寄存器复位赋值			
  74:	e0000000 	bsr      	0	// 0 <CORET_DeInit>
	SYSCON_General_CMD(ENABLE,ENDIS_SYSTICK);		//使能 STCLK 时钟
  78:	3180      	movi      	r1, 128
  7a:	4124      	lsli      	r1, r1, 4
  7c:	3001      	movi      	r0, 1
  7e:	e0000000 	bsr      	0	// 0 <SYSCON_General_CMD>
	CK801->CORET_RVR=0x26259f;						//CORETCLK=sysclock/8=20M/8=0.4us  e.g:1s=(CORET_RVR+1)*0.4us;CORET_RVR=0x2625a0-1=0x26259f
  82:	0378      	lrw      	r3, 0	// 29c <GPT_CONFIG+0x90>
  84:	0358      	lrw      	r2, 0x26259f	// 2a0 <GPT_CONFIG+0x94>
  86:	9360      	ld.w      	r3, (r3, 0)
  88:	b345      	st.w      	r2, (r3, 0x14)
	CORET_reload();									// Coret CVR 清除						
  8a:	e0000000 	bsr      	0	// 0 <CORET_reload>
	CORET_CLKSOURCE_EX();							//使用时钟源为sysclk/8
  8e:	e0000000 	bsr      	0	// 0 <CORET_CLKSOURCE_EX>
	CORET_TICKINT_Enable();							//使能计数器清零中断
  92:	e0000000 	bsr      	0	// 0 <CORET_TICKINT_Enable>
	
	CORET_start();									//Coret 计时开始				
  96:	e0000000 	bsr      	0	// 0 <CORET_start>
	CORET_Int_Enable();								//使能计数器清零中断向量
  9a:	e0000000 	bsr      	0	// 0 <CORET_Int_Enable>
	//CORET_WakeUp_Enable();							//使能计数器清零中断唤醒
	
}
  9e:	1490      	pop      	r15

000000a0 <LED_CONFIG>:
//LED Init
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/  
void LED_CONFIG(void)  
{
  a0:	14d0      	push      	r15
  a2:	1421      	subi      	sp, sp, 4
	LED_RESET_VALUE();                                          //LED 所有寄存器复位赋值
  a4:	e0000000 	bsr      	0	// 0 <LED_RESET_VALUE>
	LED_seg_io_initial(LED_SEG_0,0);							//led seg0 io 初始化
  a8:	3100      	movi      	r1, 0
  aa:	3001      	movi      	r0, 1
  ac:	e0000000 	bsr      	0	// 0 <LED_seg_io_initial>
	LED_seg_io_initial(LED_SEG_1,0);							//led seg1 io 初始化
  b0:	3100      	movi      	r1, 0
  b2:	3002      	movi      	r0, 2
  b4:	e0000000 	bsr      	0	// 0 <LED_seg_io_initial>
	LED_seg_io_initial(LED_SEG_4,0);							//led seg4 io 初始化
  b8:	3100      	movi      	r1, 0
  ba:	3005      	movi      	r0, 5
  bc:	e0000000 	bsr      	0	// 0 <LED_seg_io_initial>
	LED_seg_io_initial(LED_SEG_5,0);							//led seg5 io 初始化
  c0:	3100      	movi      	r1, 0
  c2:	3006      	movi      	r0, 6
  c4:	e0000000 	bsr      	0	// 0 <LED_seg_io_initial>
	LED_seg_io_initial(LED_SEG_6,0);							//led seg6 io 初始化
  c8:	3100      	movi      	r1, 0
  ca:	3007      	movi      	r0, 7
  cc:	e0000000 	bsr      	0	// 0 <LED_seg_io_initial>
	LED_seg_io_initial(LED_SEG_7,0);							//led seg7 io 初始化
  d0:	3100      	movi      	r1, 0
  d2:	3008      	movi      	r0, 8
  d4:	e0000000 	bsr      	0	// 0 <LED_seg_io_initial>
	LED_Control_Config(LEDCLK_DIV32,0xff,LED_Bright_100,80,1);	//F_LedClk=32/20M;COM0~COM7使能;亮度100%;COM显示周期长度=(8*32/20M)*(80+7)=1.1MS;相邻COM互不交叠区时间时间=0;
  d8:	3301      	movi      	r3, 1
  da:	3200      	movi      	r2, 0
  dc:	b860      	st.w      	r3, (sp, 0)
  de:	31ff      	movi      	r1, 255
  e0:	3350      	movi      	r3, 80
  e2:	3006      	movi      	r0, 6
  e4:	e0000000 	bsr      	0	// 0 <LED_Control_Config>
	LED_SEGDATX_data_write(SEGDAT_NUM0 , 0xaa);                 //SegDat0=0xaa
  e8:	31aa      	movi      	r1, 170
  ea:	3000      	movi      	r0, 0
  ec:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SEGDATX_data_write(SEGDAT_NUM1 , 0xbb);                 //SegDat1=0xbb
  f0:	31bb      	movi      	r1, 187
  f2:	3001      	movi      	r0, 1
  f4:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SEGDATX_data_write(SEGDAT_NUM2 , 0xcc);                 //SegDat2=0xcc
  f8:	31cc      	movi      	r1, 204
  fa:	3002      	movi      	r0, 2
  fc:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SEGDATX_data_write(SEGDAT_NUM3 , 0xdd);                 //SegDat3=0xdd
 100:	31dd      	movi      	r1, 221
 102:	3003      	movi      	r0, 3
 104:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SEGDATX_data_write(SEGDAT_NUM4 , 0xee);                 //SegDat4=0xee
 108:	31ee      	movi      	r1, 238
 10a:	3004      	movi      	r0, 4
 10c:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SEGDATX_data_write(SEGDAT_NUM5 , 0xff);                 //SegDat5=0xff
 110:	31ff      	movi      	r1, 255
 112:	3005      	movi      	r0, 5
 114:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SEGDATX_data_write(SEGDAT_NUM6 , 0x99);                 //SegDat6=0x99
 118:	3199      	movi      	r1, 153
 11a:	3006      	movi      	r0, 6
 11c:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SEGDATX_data_write(SEGDAT_NUM7 , 0x88);                 //SegDat7=0x88
 120:	3188      	movi      	r1, 136
 122:	3007      	movi      	r0, 7
 124:	e0000000 	bsr      	0	// 0 <LED_SEGDATX_data_write>
	LED_SCAN_ENABLE(ENABLE);                                    //LED Scan enable	
 128:	3001      	movi      	r0, 1
 12a:	e0000000 	bsr      	0	// 0 <LED_SCAN_ENABLE>
	//LED_INT_CMD(IPEND,ENABLE);									//LED 一个com扫描结束中断使能
	//LED_INT_CMD(ICEND,ENABLE);									//LED 所有com扫描结束中断使能

	//LED_Int_Enable();											//LED INT Vector Enable			
										
}
 12e:	1401      	addi      	sp, sp, 4
 130:	1490      	pop      	r15

00000132 <ADC_CONFIG>:
//ADC Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void ADC_CONFIG(void)
{
 132:	14d0      	push      	r15
 134:	1421      	subi      	sp, sp, 4
	ADC12_RESET_VALUE();																//ADC 所有寄存器复位赋值
 136:	e0000000 	bsr      	0	// 0 <ADC12_RESET_VALUE>
    ADC12_CLK_CMD(ADC_CLK_CR , ENABLE);                                                 //使能 ADC CLK
 13a:	3101      	movi      	r1, 1
 13c:	3002      	movi      	r0, 2
 13e:	e0000000 	bsr      	0	// 0 <ADC12_CLK_CMD>
    ADC12_Software_Reset();                                                             //ADC 软件复位
 142:	e0000000 	bsr      	0	// 0 <ADC12_Software_Reset>
	ADC12_Configure_Mode(ADC12_12BIT , One_shot_mode ,0, 2 , 2);        				//选择12BIT ADC; 单次模式; 转换优先序列寄存器为0; ADC_CLK=PCLK/2*2=0.2us; 转换序列个数为2
 146:	3302      	movi      	r3, 2
 148:	b860      	st.w      	r3, (sp, 0)
 14a:	3200      	movi      	r2, 0
 14c:	3100      	movi      	r1, 0
 14e:	3001      	movi      	r0, 1
 150:	e0000000 	bsr      	0	// 0 <ADC12_Configure_Mode>
	//ADC12_Configure_VREF_VDD();															//使用VDD为参考电压
	ADC12_Configure_VREF_FVR(ADC12_FVR_2_048V);											//使用内部为参考电压2.048mV
 154:	3000      	movi      	r0, 0
 156:	e0000000 	bsr      	0	// 0 <ADC12_Configure_VREF_FVR>
	//ADC12_Configure_VREF_EX();															//使用外部Vref为参考电压
	ADC12_ConversionChannel_Config(ADC12_ADCIN10,ADC12_3CYCLES,ADC12_CV_RepeatNum1,ADC12_AVGDIS,0);//转换序列0,选择ADCIN10通道, 3个转换周期, 连续重复采样次数为1,平均值计算禁止
 15a:	3300      	movi      	r3, 0
 15c:	b860      	st.w      	r3, (sp, 0)
 15e:	3200      	movi      	r2, 0
 160:	3100      	movi      	r1, 0
 162:	300a      	movi      	r0, 10
 164:	e0000000 	bsr      	0	// 0 <ADC12_ConversionChannel_Config>
	ADC12_ConversionChannel_Config(ADC12_ADCIN11,ADC12_3CYCLES,ADC12_CV_RepeatNum1,ADC12_AVGDIS,1);//转换序列1,选择ADCIN11通道, 3个转换周期, 连续重复采样次数为1,平均值计算禁止
 168:	3301      	movi      	r3, 1
 16a:	3200      	movi      	r2, 0
 16c:	3100      	movi      	r1, 0
 16e:	b860      	st.w      	r3, (sp, 0)
 170:	300b      	movi      	r0, 11
 172:	3300      	movi      	r3, 0
 174:	e0000000 	bsr      	0	// 0 <ADC12_ConversionChannel_Config>
	ADC12_CMD(ENABLE);                                                                  //使能ADC模块
 178:	3001      	movi      	r0, 1
 17a:	e0000000 	bsr      	0	// 0 <ADC12_CMD>
    ADC12_ready_wait(); 																//等待ADC模块配置完成
 17e:	e0000000 	bsr      	0	// 0 <ADC12_ready_wait>
	ADC12_Control(ADC12_START);															//启动ADC转换
 182:	3008      	movi      	r0, 8
 184:	e0000000 	bsr      	0	// 0 <ADC12_Control>
	 
}
 188:	1401      	addi      	sp, sp, 4
 18a:	1490      	pop      	r15

0000018c <UART_CONFIG>:
//UART Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void UART_CONFIG(void)
{
 18c:	14d0      	push      	r15
	UART_DeInit();                                                              //UART 所有寄存器复位赋值
 18e:	e0000000 	bsr      	0	// 0 <UART_DeInit>
    UART_IO_Init(IO_PA1);                                                  		//UART1脚位选择PA1.2->RXD1, PA1.1->TXD1
 192:	3001      	movi      	r0, 1
 194:	e0000000 	bsr      	0	// 0 <UART_IO_Init>
    UARTInitRxTxIntEn(UART1,173,UART1_PAR_NONE);	                            //使能Uart中断, baudrate=20000000/173=115200, 使能偶校验位
 198:	1263      	lrw      	r3, 0	// 2a4 <GPT_CONFIG+0x98>
 19a:	3200      	movi      	r2, 0
 19c:	9300      	ld.w      	r0, (r3, 0)
 19e:	31ad      	movi      	r1, 173
 1a0:	e0000000 	bsr      	0	// 0 <UARTInitRxTxIntEn>
    UART1_Int_Enable();														    //uart1 中断向量使能
 1a4:	e0000000 	bsr      	0	// 0 <UART1_Int_Enable>
    //UART1_WakeUp_Enable();                                                      //uart1 wakeup Enable
	
} 
 1a8:	1490      	pop      	r15

000001aa <USART_CONFIG>:
//USART Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void USART_CONFIG(void)
{
 1aa:	14d0      	push      	r15
 1ac:	1423      	subi      	sp, sp, 12
	USART_DeInit();                                                              	//USART 所有寄存器复位赋值
 1ae:	e0000000 	bsr      	0	// 0 <USART_DeInit>
    USART_CLK_Enable();																//USART CLK	使能
 1b2:	e0000000 	bsr      	0	// 0 <USART_CLK_Enable>
	USART_CTRL_Config(RSTRX,ENABLE);												//复位接收模块
 1b6:	3101      	movi      	r1, 1
 1b8:	3002      	movi      	r0, 2
 1ba:	e0000000 	bsr      	0	// 0 <USART_CTRL_Config>
	USART_CTRL_Config(RSTTX,ENABLE);												//复位发射模块
 1be:	3101      	movi      	r1, 1
 1c0:	3003      	movi      	r0, 3
 1c2:	e0000000 	bsr      	0	// 0 <USART_CTRL_Config>
	USART_IO_Init(USART_PB0);                                                  		//USART 使用PB0.0->RXD0, PB0.1->TXD0
 1c6:	3000      	movi      	r0, 0
 1c8:	e0000000 	bsr      	0	// 0 <USART_IO_Init>
	//USART_CLKIO_Init(CLK_PA02);													//同步模式下可以选择PA0.2作为UARTCLK
    USART_MODE_Config(SENDTIME0,PCLK,CHRL8,ASYNC,PAR_EVEN,NBSTOP1,CHMODE_NORMAL);	//重发次数为0, CLKs=PCLK, 字节长度8bit, 异步模式, 偶校验位, 1个停止位, 普通模式
 1cc:	3300      	movi      	r3, 0
 1ce:	b862      	st.w      	r3, (sp, 0x8)
 1d0:	b861      	st.w      	r3, (sp, 0x4)
 1d2:	b860      	st.w      	r3, (sp, 0)
 1d4:	32c0      	movi      	r2, 192
 1d6:	3100      	movi      	r1, 0
 1d8:	3000      	movi      	r0, 0
 1da:	e0000000 	bsr      	0	// 0 <USART_MODE_Config>
	//USART_CLKO_Config(ENABLE);														//同步模式下需要输出UARTCLK时,需要使能
    USART_Baudrate_Cal(115200,20000000,PCLK,ASYNC);									//波特率=38400, 主频选择20M, PCLK不分频, 异步模式							
 1de:	30e1      	movi      	r0, 225
 1e0:	3300      	movi      	r3, 0
 1e2:	3200      	movi      	r2, 0
 1e4:	4009      	lsli      	r0, r0, 9
 1e6:	1131      	lrw      	r1, 0x1312d00	// 2a8 <GPT_CONFIG+0x9c>
 1e8:	e0000000 	bsr      	0	// 0 <USART_Baudrate_Cal>
	USART_CTRL_Config(TXEN,ENABLE);													//USART 发送使能
 1ec:	3101      	movi      	r1, 1
 1ee:	3006      	movi      	r0, 6
 1f0:	e0000000 	bsr      	0	// 0 <USART_CTRL_Config>
	USART_CTRL_Config(RXEN,ENABLE);													//USART 接收使能
 1f4:	3101      	movi      	r1, 1
 1f6:	3004      	movi      	r0, 4
 1f8:	e0000000 	bsr      	0	// 0 <USART_CTRL_Config>
	USART_INT_Config(RXRDY_INT,ENABLE);												//USART 接收中断使能
 1fc:	3101      	movi      	r1, 1
 1fe:	3000      	movi      	r0, 0
 200:	e0000000 	bsr      	0	// 0 <USART_INT_Config>
	//USART_INT_Config(TXRDY_INT,ENABLE);												//USART 发射中断使能	
	USART_Int_Enable();																//USART 中断向量使能
 204:	e0000000 	bsr      	0	// 0 <USART_Int_Enable>
	//USART_WakeUp_Enable();															//USART 中断唤醒使能
	
}
 208:	1403      	addi      	sp, sp, 12
 20a:	1490      	pop      	r15

0000020c <GPT_CONFIG>:
//GPT Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void GPT_CONFIG(void)
{
 20c:	14d3      	push      	r4-r6, r15
 20e:	1421      	subi      	sp, sp, 4
	GPT_RESET_VALUE(GPTCH0);												//GPT0 所有寄存器复位赋值
 210:	11c7      	lrw      	r6, 0	// 2ac <GPT_CONFIG+0xa0>
	GPT_RESET_VALUE(GPTCH1);												//GPT1 所有寄存器复位赋值
 212:	11a8      	lrw      	r5, 0	// 2b0 <GPT_CONFIG+0xa4>
	GPT_RESET_VALUE(GPTCH2);												//GPT2 所有寄存器复位赋值
 214:	1188      	lrw      	r4, 0	// 2b4 <GPT_CONFIG+0xa8>
	GPT_RESET_VALUE(GPTCH0);												//GPT0 所有寄存器复位赋值
 216:	9600      	ld.w      	r0, (r6, 0)
 218:	e0000000 	bsr      	0	// 0 <GPT_RESET_VALUE>
	GPT_RESET_VALUE(GPTCH1);												//GPT1 所有寄存器复位赋值
 21c:	9500      	ld.w      	r0, (r5, 0)
 21e:	e0000000 	bsr      	0	// 0 <GPT_RESET_VALUE>
	GPT_RESET_VALUE(GPTCH2);												//GPT2 所有寄存器复位赋值
 222:	9400      	ld.w      	r0, (r4, 0)
 224:	e0000000 	bsr      	0	// 0 <GPT_RESET_VALUE>
	//GPT_IO_Init(GPT_IO_IO1A,0);												//IO1A 初始化
	//GPT_IO_Init(GPT_IO_IO1B,0);												//IO1B 初始化
	//GPT_IO_Init(GPT_IO_IO2A,0);												//IO2A 初始化
	//GPT_IO_Init(GPT_IO_IO2B,0);												//IO2B 初始化	
	
	GPTCHX_Clk_CMD(GPTCH0,ENABLE);											//GPT0 时钟使能	
 228:	9600      	ld.w      	r0, (r6, 0)
 22a:	3101      	movi      	r1, 1
 22c:	e0000000 	bsr      	0	// 0 <GPTCHX_Clk_CMD>
	GPTCHX_Clk_CMD(GPTCH1,ENABLE);											//GPT1 时钟使能
 230:	9500      	ld.w      	r0, (r5, 0)
 232:	3101      	movi      	r1, 1
 234:	e0000000 	bsr      	0	// 0 <GPTCHX_Clk_CMD>
	GPTCHX_Clk_CMD(GPTCH2,ENABLE);											//GPT2 时钟使能
 238:	3101      	movi      	r1, 1
 23a:	9400      	ld.w      	r0, (r4, 0)
 23c:	e0000000 	bsr      	0	// 0 <GPTCHX_Clk_CMD>
	
	GPTCHX_SoftwareReset(GPTCH0);											//GPT0 软件复位
 240:	9600      	ld.w      	r0, (r6, 0)
 242:	e0000000 	bsr      	0	// 0 <GPTCHX_SoftwareReset>
	GPTCHX_SoftwareReset(GPTCH1);											//GPT1 软件复位
 246:	9500      	ld.w      	r0, (r5, 0)
 248:	e0000000 	bsr      	0	// 0 <GPTCHX_SoftwareReset>
	GPTCHX_SoftwareReset(GPTCH2);											//GPT2 软件复位
 24c:	9400      	ld.w      	r0, (r4, 0)
 24e:	e0000000 	bsr      	0	// 0 <GPTCHX_SoftwareReset>
	//-------------外部时钟XC0~XC2源输入口选择-------------------
	//GPTCHX_XCn_Configure(XC0_Configure,XC0_Selecte_TCLK0);					//XC0 选择 TCLK0
	//GPTCHX_XCn_Configure(XC1_Configure,XC1_Selecte_TCLK1);					//XC1 选择 TCLK1
	//GPTCHX_XCn_Configure(XC2_Configure,XC2_Selecte_TCLK2);					//XC2 选择 TCLK2
	
	GPTCHX_CLK_Configure(GPTCH0,GPT_Mclk_Selecte_Pclk,GptClks_MCLK_DIV1,GPTCHX_CLKI_0,GPTCHX_BURST_SET_None);	//GTP0 选择 PCLK 作为 MCLK;CLKS=MCLK/1;CLK上升沿计数;关闭群脉冲模式
 252:	3300      	movi      	r3, 0
 254:	b860      	st.w      	r3, (sp, 0)
 256:	9600      	ld.w      	r0, (r6, 0)
 258:	3200      	movi      	r2, 0
 25a:	3100      	movi      	r1, 0
 25c:	e0000000 	bsr      	0	// 0 <GPTCHX_CLK_Configure>
	GPTCHX_CLK_Configure(GPTCH1,GPT_Mclk_Selecte_Pclk,GptClks_MCLK_DIV1,GPTCHX_CLKI_0,GPTCHX_BURST_SET_None);	//GTP1 选择 PCLK 作为 MCLK;CLKS=MCLK/1;CLK上升沿计数;关闭群脉冲模式
 260:	3300      	movi      	r3, 0
 262:	b860      	st.w      	r3, (sp, 0)
 264:	9500      	ld.w      	r0, (r5, 0)
 266:	3200      	movi      	r2, 0
 268:	3100      	movi      	r1, 0
 26a:	e0000000 	bsr      	0	// 0 <GPTCHX_CLK_Configure>
	GPTCHX_CLK_Configure(GPTCH2,GPT_Mclk_Selecte_Pclk,GptClks_MCLK_DIV1,GPTCHX_CLKI_0,GPTCHX_BURST_SET_None);	//GTP2 选择 PCLK 作为 MCLK;CLKS=MCLK/1;CLK上升沿计数;关闭群脉冲模式
 26e:	3300      	movi      	r3, 0
 270:	b860      	st.w      	r3, (sp, 0)
 272:	3200      	movi      	r2, 0
 274:	9400      	ld.w      	r0, (r4, 0)
 276:	3100      	movi      	r1, 0
 278:	e0000000 	bsr      	0	// 0 <GPTCHX_CLK_Configure>
	
	//------------RC匹配定时模块-------------------------
	GPTCHX_COUNT_Configure(GPTCH0,CPC_Reload_ENABLE);						//GPT0 RC匹配重新计数
 27c:	3180      	movi      	r1, 128
 27e:	9600      	ld.w      	r0, (r6, 0)
 280:	4127      	lsli      	r1, r1, 7
 282:	e0000000 	bsr      	0	// 0 <GPTCHX_COUNT_Configure>
	GPTCHX_COUNT_Configure(GPTCH1,CPC_Reload_ENABLE);						//GPT1 RC匹配重新计数
 286:	3180      	movi      	r1, 128
 288:	9500      	ld.w      	r0, (r5, 0)
 28a:	4127      	lsli      	r1, r1, 7
 28c:	e0000000 	bsr      	0	// 0 <GPTCHX_COUNT_Configure>
	GPTCHX_COUNT_Configure(GPTCH2,CPC_Reload_ENABLE);						//GPT2 RC匹配重新计数
 290:	3180      	movi      	r1, 128
 292:	9400      	ld.w      	r0, (r4, 0)
 294:	0412      	br      	0x2b8	// 2b8 <GPT_CONFIG+0xac>
	...
 29e:	0000      	.short	0x0000
 2a0:	0026259f 	.long	0x0026259f
 2a4:	00000000 	.long	0x00000000
 2a8:	01312d00 	.long	0x01312d00
	...
 2b8:	4127      	lsli      	r1, r1, 7
 2ba:	e0000000 	bsr      	0	// 0 <GPTCHX_COUNT_Configure>
	//					TIOA_SWTRG_OutPut_High,TIOA_EEVT_OutPut_NoChange,TIOA_CPA_OutPut_Low,TIOA_CPC_OutPut_High,TIOB_SWTRG_OutPut_High,TIOB_EEVT_OutPut_NoChange,TIOB_CPB_OutPut_Low,TIOB_CPC_OutPut_High);
	//GPT1,RC匹配停止计数禁止;RC匹配停止计数时钟禁止;RC匹配重新计数禁止;外部事件触发重新计数禁止;外部事件XC0选择禁止;软件触发TIOA为高电平;外部事件触发TIOA不改变;RA匹配TIOA输出低电平;RC匹配TIOA输出高;软件触发TIOB为高电平;外部事件触发TIOB不改变;RB匹配TIOB输出低电平;RC匹配TIOB输出高
	//GPTCHX_PWM_Configure(GPTCH2,CPC_STOP_DISABLE,CPC_DisCountClk_DISABLE,CPC_Reload_ENABLE,EEVT_Reload_DISABLE,EEVT_XC0_NONE,
	//					TIOA_SWTRG_OutPut_High,TIOA_EEVT_OutPut_NoChange,TIOA_CPA_OutPut_Low,TIOA_CPC_OutPut_High,TIOB_SWTRG_OutPut_High,TIOB_EEVT_OutPut_NoChange,TIOB_CPB_OutPut_Low,TIOB_CPC_OutPut_High);
	//GPT2,RC匹配停止计数禁止;RC匹配停止计数时钟禁止;RC匹配重新计数禁止;外部事件触发重新计数禁止;外部事件XC0选择禁止;软件触发TIOA为高电平;外部事件间触发TIOA不改变;RA匹配TIOA输出低电平;RC匹配TIOA输出高;软件触发TIOB为高电平;外部事件触发TIOB不改变;RB匹配TIOB输出低电平;RC匹配TIOB输出高
	GPTCHX_Set_RA_RB_RC(GPTCH0,0,0,1000);				//GPT0 RA=0,RB=0,RC=1000
 2be:	33fa      	movi      	r3, 250
 2c0:	9600      	ld.w      	r0, (r6, 0)
 2c2:	4362      	lsli      	r3, r3, 2
 2c4:	3200      	movi      	r2, 0
 2c6:	3100      	movi      	r1, 0
 2c8:	e0000000 	bsr      	0	// 0 <GPTCHX_Set_RA_RB_RC>
	GPTCHX_Set_RA_RB_RC(GPTCH1,0,0,1000);				//GPT1 RA=0,RB=0,RC=1000
 2cc:	33fa      	movi      	r3, 250
 2ce:	9500      	ld.w      	r0, (r5, 0)
 2d0:	4362      	lsli      	r3, r3, 2
 2d2:	3200      	movi      	r2, 0
 2d4:	3100      	movi      	r1, 0
 2d6:	e0000000 	bsr      	0	// 0 <GPTCHX_Set_RA_RB_RC>
	GPTCHX_Set_RA_RB_RC(GPTCH2,0,0,1000);				//GPT2 RA=0,RB=0,RC=1000
 2da:	33fa      	movi      	r3, 250
 2dc:	4362      	lsli      	r3, r3, 2
 2de:	9400      	ld.w      	r0, (r4, 0)
 2e0:	3200      	movi      	r2, 0
 2e2:	3100      	movi      	r1, 0
 2e4:	e0000000 	bsr      	0	// 0 <GPTCHX_Set_RA_RB_RC>
	
	//GPTCHX_ConfigInterrupt_CMD(GPTCH0,GPTCHX_INT_COVFS,ENABLE);			//使能 GPT0计数溢出中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH0,GPTCHX_INT_LOVRS,ENABLE);			//使能 GPT0载入溢出中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH0,GPTCHX_INT_CPAS,ENABLE);			//使能 GPT0比较寄存器A匹配中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH0,GPTCHX_INT_CPBS,ENABLE);			//使能 GPT0比较寄存器B匹配中断
	GPTCHX_ConfigInterrupt_CMD(GPTCH0,GPTCHX_INT_CPCS,ENABLE);			//使能 GPT0比较寄存器C匹配中断
 2e8:	9600      	ld.w      	r0, (r6, 0)
 2ea:	3201      	movi      	r2, 1
 2ec:	3110      	movi      	r1, 16
 2ee:	e0000000 	bsr      	0	// 0 <GPTCHX_ConfigInterrupt_CMD>
	
	//GPTCHX_ConfigInterrupt_CMD(GPTCH1,GPTCHX_INT_COVFS,ENABLE);			//使能 GPT1计数溢出中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH1,GPTCHX_INT_LOVRS,ENABLE);			//使能 GPT1载入溢出中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH1,GPTCHX_INT_CPAS,ENABLE);			//使能 GPT1比较寄存器A匹配中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH1,GPTCHX_INT_CPBS,ENABLE);			//使能 GPT1比较寄存器B匹配中断
	GPTCHX_ConfigInterrupt_CMD(GPTCH1,GPTCHX_INT_CPCS,ENABLE);			//使能 GPT1比较寄存器C匹配中断
 2f2:	9500      	ld.w      	r0, (r5, 0)
 2f4:	3201      	movi      	r2, 1
 2f6:	3110      	movi      	r1, 16
 2f8:	e0000000 	bsr      	0	// 0 <GPTCHX_ConfigInterrupt_CMD>
	
	//GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_COVFS,ENABLE);			//使能 GPT2计数溢出中断	
	//GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_LOVRS,ENABLE);			//使能 GPT2载入溢出中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_CPAS,ENABLE);			//使能 GPT2比较寄存器A匹配中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_CPBS,ENABLE);			//使能 GPT2比较寄存器B匹配中断
	GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_CPCS,ENABLE);			//使能 GPT2比较寄存器C匹配中断
 2fc:	3201      	movi      	r2, 1
 2fe:	9400      	ld.w      	r0, (r4, 0)
 300:	3110      	movi      	r1, 16
 302:	e0000000 	bsr      	0	// 0 <GPTCHX_ConfigInterrupt_CMD>
	//GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_LDRAS,ENABLE);			//使能 GPT2载入寄存器A中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_LDRBS,ENABLE);			//使能 GPT2载入寄存器B中断
	//GPTCHX_ConfigInterrupt_CMD(GPTCH2,GPTCHX_INT_ETRGS,ENABLE);			//使能 GPT2外部触发中断
	
	//---------------------GPT 开启-----------------------
	GPTCHX_CountClk_CMD(GPTCH0,ENABLE);									//使能 GPT0 计数时钟
 306:	9600      	ld.w      	r0, (r6, 0)
 308:	3101      	movi      	r1, 1
 30a:	e0000000 	bsr      	0	// 0 <GPTCHX_CountClk_CMD>
	GPTCHX_CountClk_CMD(GPTCH1,ENABLE);									//使能 GPT1 计数时钟
 30e:	9500      	ld.w      	r0, (r5, 0)
 310:	3101      	movi      	r1, 1
 312:	e0000000 	bsr      	0	// 0 <GPTCHX_CountClk_CMD>
	GPTCHX_CountClk_CMD(GPTCH2,ENABLE);									//使能 GPT2 计数时钟
 316:	3101      	movi      	r1, 1
 318:	9400      	ld.w      	r0, (r4, 0)
 31a:	e0000000 	bsr      	0	// 0 <GPTCHX_CountClk_CMD>
	//All_GPT_SWTRG();													//GPT0、GPT1、GPT2同时触发
	GPTCHX_SWTRG(GPTCH0);												//软件触发GPT0  
 31e:	9600      	ld.w      	r0, (r6, 0)
 320:	e0000000 	bsr      	0	// 0 <GPTCHX_SWTRG>
	GPTCHX_SWTRG(GPTCH1);												//软件触发GPT1  
 324:	9500      	ld.w      	r0, (r5, 0)
 326:	e0000000 	bsr      	0	// 0 <GPTCHX_SWTRG>
	GPTCHX_SWTRG(GPTCH2);												//软件触发GPT2  
 32a:	9400      	ld.w      	r0, (r4, 0)
 32c:	e0000000 	bsr      	0	// 0 <GPTCHX_SWTRG>
	
	GPTCH0_Int_Enable();												//使能 GPT0 中断向量
 330:	e0000000 	bsr      	0	// 0 <GPTCH0_Int_Enable>
	GPTCH1_Int_Enable();												//使能 GPT1 中断向量
 334:	e0000000 	bsr      	0	// 0 <GPTCH1_Int_Enable>
	GPTCH2_Int_Enable();												//使能 GPT2 中断向量
 338:	e0000000 	bsr      	0	// 0 <GPTCH2_Int_Enable>
	
}
 33c:	1401      	addi      	sp, sp, 4
 33e:	1493      	pop      	r4-r6, r15

00000340 <GTC_CONFIG>:
//gtc Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void GTC_CONFIG(void)
{
 340:	14d0      	push      	r15
 342:	1422      	subi      	sp, sp, 8
    GTC_RESET_VALUE();                                                        	//GTC 所有寄存器复位赋值
 344:	e0000000 	bsr      	0	// 0 <GTC_RESET_VALUE>
	GTC_SoftwareReset();														//GTC 软件复位
 348:	e0000000 	bsr      	0	// 0 <GTC_SoftwareReset>
    //GTC_IO_Init(GTC_IO_TXOUT , 0 );                                           //PWM输出初始化
    GTC_Configure(GTC_FIN_PCLK , 1 , 9 , Counter_Size_32BIT  , 100000 , 0);  		//TCCLK=sysclock/2^1/10，GTC_Clk-->1us
 34c:	3300      	movi      	r3, 0
 34e:	b861      	st.w      	r3, (sp, 0x4)
 350:	0363      	lrw      	r3, 0x186a0	// 5c0 <SPI_MASTER_CONFIG+0x22>
 352:	3209      	movi      	r2, 9
 354:	b860      	st.w      	r3, (sp, 0)
 356:	3101      	movi      	r1, 1
 358:	331f      	movi      	r3, 31
 35a:	3000      	movi      	r0, 0
 35c:	e0000000 	bsr      	0	// 0 <GTC_Configure>
    GTC_ControlSet_Configure(GTC_ControlSet_REPEAT,ENABLE);                  	//使能循环重复模式
 360:	3080      	movi      	r0, 128
 362:	3101      	movi      	r1, 1
 364:	4006      	lsli      	r0, r0, 6
 366:	e0000000 	bsr      	0	// 0 <GTC_ControlSet_Configure>
	//GTC_ControlSet_Configure(GTC_ControlSet_OUTST,ENABLE);                   		//计数开始时输出高电平
    //GTC_ControlSet_Configure(GTC_ControlSet_CAPT_F,ENABLE);                		//下降沿捕捉使能
    //GTC_ControlSet_Configure(GTC_ControlSet_CAPT_TCAP,ENABLE);            		//捕捉输入使能
    //GTC_ConfigInterrupt_CMD(GTC_STARTI, ENABLE);                         			//start中断使能
    //GTC_ConfigInterrupt_CMD(GTC_STOPI, ENABLE);                          			//stop中断使能
    GTC_ConfigInterrupt_CMD(GTC_PSTARTI, ENABLE);                          		//周期start中断使能
 36a:	3101      	movi      	r1, 1
 36c:	3004      	movi      	r0, 4
 36e:	e0000000 	bsr      	0	// 0 <GTC_ConfigInterrupt_CMD>
    //GTC_ConfigInterrupt_CMD(GTC_PENDI, ENABLE);                          			//周期stop中断使能
    //GTC_ConfigInterrupt_CMD(GTC_MATI, ENABLE);                           			//脉冲匹配中断使能
    //GTC_ConfigInterrupt_CMD(GTC_OVFI, ENABLE);                           			//溢出中断使能
    //GTC_ConfigInterrupt_CMD(GTC_CAPTI, ENABLE);                          			//捕捉中断使能
    GTC_Start();                                                              	//start GTC
 372:	e0000000 	bsr      	0	// 0 <GTC_Start>
    GTC_Int_Enable();                                                           //使能GTC中断向量
 376:	e0000000 	bsr      	0	// 0 <GTC_Int_Enable>
	
}
 37a:	1402      	addi      	sp, sp, 8
 37c:	1490      	pop      	r15

0000037e <STC16_CONFIG>:
//stc16 Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void STC16_CONFIG(void)
{
 37e:	14d0      	push      	r15
 380:	1422      	subi      	sp, sp, 8
	STC16_RESET_VALUE();														//STC16 所有寄存器复位赋值
 382:	e0000000 	bsr      	0	// 0 <STC16_RESET_VALUE>
	STC16_Softreset();															//STC16 软件复位
 386:	e0000000 	bsr      	0	// 0 <STC16_Softreset>
	
	//STC16_IO_Init(STC16_IO_CAP0,0);												//STC16 CAP0 初始化
	//STC16_IO_Init(STC16_IO_CAP1,0);												//STC16 CAP1 初始化
	
	STC16_Clk_CMD(ENABLE);														//STC16 时钟使能
 38a:	3001      	movi      	r0, 1
 38c:	e0000000 	bsr      	0	// 0 <STC16_Clk_CMD>
	
	//STC16_Channel0_CMD(ENABLE);													//STC16 通道0使能
	//STC16_Channel1_CMD(ENABLE);													//STC16 通道1使能
	
	STC16_Configure(STC16_Count_mode_Continue,STC16_Count_STOPTYPE_StopConmand,STC16_CM0_Mode_Capture,STC16_CM1_Mode_Match,19,0);
 390:	3300      	movi      	r3, 0
 392:	b861      	st.w      	r3, (sp, 0x4)
 394:	3180      	movi      	r1, 128
 396:	3313      	movi      	r3, 19
 398:	b860      	st.w      	r3, (sp, 0)
 39a:	3201      	movi      	r2, 1
 39c:	3300      	movi      	r3, 0
 39e:	4122      	lsli      	r1, r1, 2
 3a0:	3000      	movi      	r0, 0
 3a2:	e0000000 	bsr      	0	// 0 <STC16_Configure>
	//STC16 Configure;设置为连续计数模式;单次计数模式下,选择立即停止模式;通道0作为捕捉模式;通道1作为匹配模式;stc16_timeclk=pclk/(19+1)/2^0=1us
	//STC16_Channel0_Capture_LoadMode_set(STC16_C0SR_CaptureFall);					//stc16 Channel0下降沿捕捉
	STC16_CNR_CC0_CC1_Load(10000,0,0);												//STC16 CNTR=50,CC0R=0,CC1R=0
 3a6:	3200      	movi      	r2, 0
 3a8:	3100      	movi      	r1, 0
 3aa:	0318      	lrw      	r0, 0x2710	// 5c4 <SPI_MASTER_CONFIG+0x26>
 3ac:	e0000000 	bsr      	0	// 0 <STC16_CNR_CC0_CC1_Load>
	
	
	//STC16_MINT_CMD(ST16_STARTI,ENABLE);											//STC16 STARTI中断使能
	//STC16_MINT_CMD(ST16_STOPI,ENABLE);											//STC16 STOP中断使能
	STC16_MINT_CMD(ST16_PENDI,ENABLE);											//STC16 周期结束中断使能	
 3b0:	3101      	movi      	r1, 1
 3b2:	3004      	movi      	r0, 4
 3b4:	e0000000 	bsr      	0	// 0 <STC16_MINT_CMD>
	//STC16_CINT_CMD(ST16_CC1RI,ENABLE);											//STC16 通道1上升沿中断使能
	//STC16_CINT_CMD(ST16_CC1FI,ENABLE);											//STC16 通道1下降沿中断使能
	//STC16_CINT_CMD(ST16_Match0,ENABLE);												//STC16 通道0匹配中断
	//STC16_CINT_CMD(ST16_Match1,ENABLE);												//STC16 通道1匹配中断
	
	STC16_Start();																//Start stc16
 3b8:	e0000000 	bsr      	0	// 0 <STC16_Start>
	STC16_Int_Enable();															//ENABLE STC16 中断向量
 3bc:	e0000000 	bsr      	0	// 0 <STC16_Int_Enable>
	
}
 3c0:	1402      	addi      	sp, sp, 8
 3c2:	1490      	pop      	r15

000003c4 <CTC_CONFIG>:
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
//计算公式：Trct_ck * (2^32 - TIMDR) 
void CTC_CONFIG(void)
{
 3c4:	14d0      	push      	r15
	CTC_RESET_VALUE();									//CTC 所有寄存器复位赋值
 3c6:	e0000000 	bsr      	0	// 0 <CTC_RESET_VALUE>
	CTC_SoftReset();									//CTC 软件复位
 3ca:	e0000000 	bsr      	0	// 0 <CTC_SoftReset>
	//CTC_IO_Init(0);										//BUZZ io 初始化
	CTC_Clk_CMD(ENABLE);								//使能 CTC_CLK
 3ce:	3001      	movi      	r0, 1
 3d0:	e0000000 	bsr      	0	// 0 <CTC_Clk_CMD>
	CTC_Config(CTC_CLK_Source_set_EMOSC,CTC_BUZZ_Freq_1kHz,CTC_Count_Period_PRDR);		//CTC使用外部晶振振，buzz输出频率为1Khz, 计数周期2s,若计数周期大于2s,周期=PRDR*2S
 3d4:	3238      	movi      	r2, 56
 3d6:	3102      	movi      	r1, 2
 3d8:	3000      	movi      	r0, 0
 3da:	e0000000 	bsr      	0	// 0 <CTC_Config>
	CTC->PRDR=0X02;
 3de:	137b      	lrw      	r3, 0	// 5c8 <SPI_MASTER_CONFIG+0x2a>
 3e0:	3202      	movi      	r2, 2
 3e2:	9360      	ld.w      	r3, (r3, 0)
 3e4:	b345      	st.w      	r2, (r3, 0x14)
	CTC_INT_CMD(CTC_INT_PEND,ENABLE);					//使能 CTC PEND 中断
 3e6:	3101      	movi      	r1, 1
 3e8:	3001      	movi      	r0, 1
 3ea:	e0000000 	bsr      	0	// 0 <CTC_INT_CMD>
	//CTC_INT_CMD(CTC_INT_OVF,ENABLE);						//使能 CTC OVF 中断
	CTC_Start();										//CTC 开启
 3ee:	e0000000 	bsr      	0	// 0 <CTC_Start>
	CTC_Int_Enable();									//使能 CTC 中断向量		
 3f2:	e0000000 	bsr      	0	// 0 <CTC_Int_Enable>
	CTC_Wakeup_Enable();								//使能 CTC 唤醒
 3f6:	e0000000 	bsr      	0	// 0 <CTC_Wakeup_Enable>
	
}
 3fa:	1490      	pop      	r15

000003fc <CMP_CONFIG>:
//CMP Init
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/  
void CMP_CONFIG(void)
{
 3fc:	14d0      	push      	r15
 3fe:	1423      	subi      	sp, sp, 12
	CMP_RESET_VALUE();								//CMP 所有寄存器复位赋值
 400:	e0000000 	bsr      	0	// 0 <CMP_RESET_VALUE>
	CMP_software_reset();							//CMP 软件复位	
 404:	e0000000 	bsr      	0	// 0 <CMP_software_reset>
	
	CMP_IO_Init(CPINP0,0);							//CPINP0 初始化
 408:	3100      	movi      	r1, 0
 40a:	3000      	movi      	r0, 0
 40c:	e0000000 	bsr      	0	// 0 <CMP_IO_Init>
	//CMP_IO_Init(CPINP6,0);							//CPINP6 初始化
	//CMP_IO_Init(CPINP7,0);							//CPINP7 初始化
	//CMP_IO_Init(CPINP8,0);							//CPINP8 初始化
	//CMP_IO_Init(CPINP9,0);							//CPINP9 初始化
	
	CMP_IO_Init(CPINN0,0);							//CPINN0 初始化	
 410:	3100      	movi      	r1, 0
 412:	300a      	movi      	r0, 10
 414:	e0000000 	bsr      	0	// 0 <CMP_IO_Init>
	//CMP_IO_Init(CPINN1,0);							//CPINN1 初始化		
	//CMP_IO_Init(CPINN2,0);							//CPINN2 初始化	
	//CMP_IO_Init(CPINN3,0);							//CPINN3 初始化	
	//CMP_IO_Init(CPINN4,0);							//CPINN4 初始化	
	
	CMP_IO_Init(CP0_OUT,0);							//CP0_OUT 初始化	
 418:	3100      	movi      	r1, 0
 41a:	300f      	movi      	r0, 15
 41c:	e0000000 	bsr      	0	// 0 <CMP_IO_Init>
	//CMP_IO_Init(CP1_OUT,0);							//CP1_OUT 初始化	
	//CMP_IO_Init(CP2_OUT,0);							//CP2_OUT 初始化	
	//CMP_IO_Init(CP3_OUT,0);							//CP3_OUT 初始化	
	//CMP_IO_Init(CP4_OUT,0);							//CP4_OUT 初始化	
	
	CMP_INPCRX_Config(CMP0_NUM,248,0);						//比较器负向:CPINN0  比较器正向:CPINP0
 420:	3200      	movi      	r2, 0
 422:	31f8      	movi      	r1, 248
 424:	3000      	movi      	r0, 0
 426:	e0000000 	bsr      	0	// 0 <CMP_INPCRX_Config>
	CMP_CLK_CMD(CMP0_NUM,ENABLE);							//比较器0时钟使能
 42a:	3101      	movi      	r1, 1
 42c:	3000      	movi      	r0, 0
 42e:	e0000000 	bsr      	0	// 0 <CMP_CLK_CMD>
	CMP_CR_Config(CMP0_NUM,NHYST_0mv,PHYST_0mv,POLARITY_0,EVE_SEL_fall_rise,EN_FLTEN,CPOS_1);
 432:	3380      	movi      	r3, 128
 434:	4368      	lsli      	r3, r3, 8
 436:	b862      	st.w      	r3, (sp, 0x8)
 438:	3380      	movi      	r3, 128
 43a:	4363      	lsli      	r3, r3, 3
 43c:	b861      	st.w      	r3, (sp, 0x4)
 43e:	3380      	movi      	r3, 128
 440:	4362      	lsli      	r3, r3, 2
 442:	b860      	st.w      	r3, (sp, 0)
 444:	3200      	movi      	r2, 0
 446:	3300      	movi      	r3, 0
 448:	3100      	movi      	r1, 0
 44a:	3000      	movi      	r0, 0
 44c:	e0000000 	bsr      	0	// 0 <CMP_CR_Config>
	//使能CMP0比较器，比较器正向和负向迟滞电压为0mV，比较器输出不反向，事件触发为上升沿和下降沿，滤波器使能，选择经过滤波器后输出
	CMPX_FLTCR_Config(CMP0_NUM,CMPX_CLK_PCLK,4,199);		//FLT_CK = 20M/(199+1)/2^4=160us; 滤波次数固定为3次 160us*3=480us
 450:	33c7      	movi      	r3, 199
 452:	3204      	movi      	r2, 4
 454:	3100      	movi      	r1, 0
 456:	3000      	movi      	r0, 0
 458:	e0000000 	bsr      	0	// 0 <CMPX_FLTCR_Config>
	CMP_Open(CMP0_NUM);										//比较器0打开
 45c:	3000      	movi      	r0, 0
 45e:	e0000000 	bsr      	0	// 0 <CMP_Open>
	CMP->ICR =	EDGEDET0;									//清除CMP0中断标志位
 462:	127b      	lrw      	r3, 0	// 5cc <SPI_MASTER_CONFIG+0x2e>
 464:	3201      	movi      	r2, 1
 466:	9360      	ld.w      	r3, (r3, 0)
 468:	b357      	st.w      	r2, (r3, 0x5c)
	CMP_ConfigInterrupt_CMD(EDGEDET0,ENABLE);				//CMP0 中断使能
 46a:	3101      	movi      	r1, 1
 46c:	3001      	movi      	r0, 1
 46e:	e0000000 	bsr      	0	// 0 <CMP_ConfigInterrupt_CMD>
	//CMPX_FLTCR_Config(CMP4_NUM,CMPX_CLK_PCLK,4,199);			//FLT_CK = 20M/(199+1)/2^4=160ms; 滤波次数固定为3次
	//CMP_Open(CMP4_NUM);										//比较器4打开
	//CMP->ICR = EDGEDET4;										//清除CMP4中断标志位
	//CMP_ConfigInterrupt_CMD(EDGEDET4,ENABLE);					//CMP4 中断使能
	
	CMP0_Int_Enable();										//CMP0~CMP1 中断向量使能
 472:	e0000000 	bsr      	0	// 0 <CMP0_Int_Enable>
	//CMP1_Int_Enable();										//CMP2~CMP3 中断向量使能
	
}
 476:	1403      	addi      	sp, sp, 12
 478:	1490      	pop      	r15

0000047a <OPAMP_CONFIG>:
//OPAMP Init
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/ 
void OPAMP_CONFIG(void)
{
 47a:	14d0      	push      	r15
 47c:	1422      	subi      	sp, sp, 8
	OPA_RESET_VALUE();										//OPAx 所有寄存器复位赋值
 47e:	e0000000 	bsr      	0	// 0 <OPA_RESET_VALUE>
	
	OPA_IO_Init(OPA0P,0);									//OPA0P 初始化				
 482:	3100      	movi      	r1, 0
 484:	3001      	movi      	r0, 1
 486:	e0000000 	bsr      	0	// 0 <OPA_IO_Init>
	//OPA_IO_Init(OPA0N,0);									//OPA0N 初始化				
	OPA_IO_Init(OPA0X,0);									//OPA0X 初始化				
 48a:	3100      	movi      	r1, 0
 48c:	3003      	movi      	r0, 3
 48e:	e0000000 	bsr      	0	// 0 <OPA_IO_Init>
	
	OPA_IO_Init(OPA1P,0);									//OPA1P 初始化		
 492:	3100      	movi      	r1, 0
 494:	3004      	movi      	r0, 4
 496:	e0000000 	bsr      	0	// 0 <OPA_IO_Init>
	//OPA_IO_Init(OPA1N,0);									//OPA1N 初始化		
	OPA_IO_Init(OPA1X,0);									//OPA1X 初始化		
 49a:	3100      	movi      	r1, 0
 49c:	3006      	movi      	r0, 6
 49e:	e0000000 	bsr      	0	// 0 <OPA_IO_Init>
	
	OPA_EN_CMD(OPA0_NUM,ENABLE);							//OPA0  ENABLE
 4a2:	3101      	movi      	r1, 1
 4a4:	3000      	movi      	r0, 0
 4a6:	e0000000 	bsr      	0	// 0 <OPA_EN_CMD>
	OPA_EN_CMD(OPA1_NUM,ENABLE);							//OPA1  ENABLE
 4aa:	3101      	movi      	r1, 1
 4ac:	3001      	movi      	r0, 1
 4ae:	e0000000 	bsr      	0	// 0 <OPA_EN_CMD>
	
	OPA_Config_Prg(OPA0_NUM,PGAEN_ENABLE,Op_ExtPinConnect_DIS,0,4,0);			//OPA0,使能内部增益控制,负向输入口与PIN脚连通禁止,正向输入口为OPA0P,增益x5,微调增益0
 4b2:	3300      	movi      	r3, 0
 4b4:	b861      	st.w      	r3, (sp, 0x4)
 4b6:	3304      	movi      	r3, 4
 4b8:	b860      	st.w      	r3, (sp, 0)
 4ba:	3200      	movi      	r2, 0
 4bc:	3300      	movi      	r3, 0
 4be:	3101      	movi      	r1, 1
 4c0:	3000      	movi      	r0, 0
 4c2:	e0000000 	bsr      	0	// 0 <OPA_Config_Prg>
	OPA_Config_Prg(OPA1_NUM,PGAEN_ENABLE,Op_ExtPinConnect_DIS,0,1,0);			//OPA1,使能内部增益控制,负向输入口与PIN脚连通禁止,正向输入口为OPA1P,增益x10,微调增益0
 4c6:	3300      	movi      	r3, 0
 4c8:	b861      	st.w      	r3, (sp, 0x4)
 4ca:	3301      	movi      	r3, 1
 4cc:	b860      	st.w      	r3, (sp, 0)
 4ce:	3200      	movi      	r2, 0
 4d0:	3300      	movi      	r3, 0
 4d2:	3101      	movi      	r1, 1
 4d4:	3001      	movi      	r0, 1
 4d6:	e0000000 	bsr      	0	// 0 <OPA_Config_Prg>
	
}
 4da:	1402      	addi      	sp, sp, 8
 4dc:	1490      	pop      	r15

000004de <EPWM_CONFIG>:
/*                   - PX ---                           -- PWM_X        */
/*      PWM Engine --         ---PWM output Control ---                 */
/*                   -PY ---                            --PWM_Y         */
/*************************************************************************/ 
void EPWM_CONFIG(void)
{
 4de:	14d0      	push      	r15
 4e0:	1425      	subi      	sp, sp, 20
	EPWM_RESET_VALUE();									//EPWM 所有寄存器复位赋值
 4e2:	e0000000 	bsr      	0	// 0 <EPWM_RESET_VALUE>
	EPWM_software_reset();								//EPWM 软件复位	
 4e6:	e0000000 	bsr      	0	// 0 <EPWM_software_reset>
	
	//EPWM_IO_Init(PWM_X0,0);							//PWM_X0 初始化
	EPWM_IO_Init(PWM_Y0,1);							//PWM_Y0 初始化
 4ea:	3101      	movi      	r1, 1
 4ec:	3001      	movi      	r0, 1
 4ee:	e0000000 	bsr      	0	// 0 <EPWM_IO_Init>
	//EPWM_IO_Init(PWM_EP1,0);							//PWM_EP1 初始化
	//EPWM_IO_Init(PWM_EP2,0);							//PWM_EP2 初始化
	//EPWM_IO_Init(PWM_EP3,0);							//PWM_EP3 初始化
	//EPWM_IO_Init(PWM_EP4,0);							//PWM_EP4 初始化
		
	EPWM_CONTER_Configure(EPWM_ContMode_decrease,EPWM_Conter_three,EMP_Overflow_Mode_Continue,0,1);		//递减计数, EPMW_CLK=PCLK/(2^DIVN)/(DINM+1)=20M/2/(9+1)=1M=1US, 单次触发
 4f2:	3301      	movi      	r3, 1
 4f4:	b860      	st.w      	r3, (sp, 0)
 4f6:	3200      	movi      	r2, 0
 4f8:	3300      	movi      	r3, 0
 4fa:	3100      	movi      	r1, 0
 4fc:	3008      	movi      	r0, 8
 4fe:	e0000000 	bsr      	0	// 0 <EPWM_CONTER_Configure>
	
	//EPWM_PX_PY_Configure(EPWM_P0X,EPWM_StartStopEvent_OutHigh,EPWM_PendEvent_OutHigh,EPWM_CentralEvent_NoChange,EPWM_EqCMPAEvent_OutLow,EPWM_EqCMPBEvent_NoChange,1000,500,0);	//P0X CNTR=1000,CMPAR=500,CMPBR=0
	EPWM_PX_PY_Configure(EPWM_P0Y,EPWM_StartStopEvent_OutLow,EPWM_PendEvent_OutLow,EPWM_CentralEvent_NoChange,EPWM_EqCMPAEvent_OutHigh,EPWM_EqCMPBEvent_NoChange,1000,500,0);		//P0Y CNTR=1000,CMPAR=500,CMPBR=0
 502:	3300      	movi      	r3, 0
 504:	b864      	st.w      	r3, (sp, 0x10)
 506:	33fa      	movi      	r3, 250
 508:	4361      	lsli      	r3, r3, 1
 50a:	b863      	st.w      	r3, (sp, 0xc)
 50c:	33fa      	movi      	r3, 250
 50e:	4362      	lsli      	r3, r3, 2
 510:	b862      	st.w      	r3, (sp, 0x8)
 512:	3300      	movi      	r3, 0
 514:	b861      	st.w      	r3, (sp, 0x4)
 516:	3302      	movi      	r3, 2
 518:	b860      	st.w      	r3, (sp, 0)
 51a:	3201      	movi      	r2, 1
 51c:	3300      	movi      	r3, 0
 51e:	3101      	movi      	r1, 1
 520:	3001      	movi      	r0, 1
 522:	e0000000 	bsr      	0	// 0 <EPWM_PX_PY_Configure>
	//EPWM_PX_PY_Configure(EPWM_P1X,EPWM_StartStopEvent_OutHigh,EPWM_PendEvent_OutHigh,EPWM_CentralEvent_NoChange,EPWM_EqCMPAEvent_OutLow,EPWM_EqCMPBEvent_NoChange,1000,500,0);	//P1X CNTR=1000,CMPAR=500,CMPBR=0
	//EPWM_PX_PY_Configure(EPWM_P1Y,EPWM_StartStopEvent_OutLow,EPWM_PendEvent_OutLow,EPWM_CentralEvent_NoChange,EPWM_EqCMPAEvent_OutHigh,EPWM_EqCMPBEvent_NoChange,1000,500,0);		//P1Y CNTR=1000,CMPAR=500,CMPBR=0
	//EPWM_PX_PY_Configure(EPWM_P2X,EPWM_StartStopEvent_OutHigh,EPWM_PendEvent_OutHigh,EPWM_CentralEvent_NoChange,EPWM_EqCMPAEvent_OutLow,EPWM_EqCMPBEvent_NoChange,1000,500,0);	//P2X CNTR=1000,CMPAR=500,CMPBR=0
	//EPWM_PX_PY_Configure(EPWM_P2Y,EPWM_StartStopEvent_OutLow,EPWM_PendEvent_OutLow,EPWM_CentralEvent_NoChange,EPWM_EqCMPAEvent_OutHigh,EPWM_EqCMPBEvent_NoChange,1000,500,0);		//P2Y CNTR=1000,CMPAR=500,CMPBR=0
	
	EPWM_OUTPUT_Configure(EPWM_PWM_X0OrPWM_Y0,EPWM_OUTSE_PXPYOutputDirect,EPWM_X_POLARITY_NoChange,EPWM_Y_POLARITY_NoChange,EPWM_SRCSEL_PX,0x10,0x10);		//PWM_X PWM_Y 直接输出模式,输出端电平保持不变,RED=EPMW_CLK*16=16us,FED=EPMW_CLK*16=16us								
 526:	3310      	movi      	r3, 16
 528:	b862      	st.w      	r3, (sp, 0x8)
 52a:	b861      	st.w      	r3, (sp, 0x4)
 52c:	3300      	movi      	r3, 0
 52e:	b860      	st.w      	r3, (sp, 0)
 530:	3200      	movi      	r2, 0
 532:	3100      	movi      	r1, 0
 534:	3000      	movi      	r0, 0
 536:	e0000000 	bsr      	0	// 0 <EPWM_OUTPUT_Configure>
	EPWM_OUTPUT_Configure(EPWM_PWM_X1OrPWM_Y1,EPWM_OUTSE_PXPYOutputDirect,EPWM_X_POLARITY_NoChange,EPWM_Y_POLARITY_NoChange,EPWM_SRCSEL_PX,0x10,0x10);		//PWM_X PWM_Y 直接输出模式,输出端电平保持不变,RED=EPMW_CLK*16=16us,FED=EPMW_CLK*16=16us						
 53a:	3310      	movi      	r3, 16
 53c:	b862      	st.w      	r3, (sp, 0x8)
 53e:	b861      	st.w      	r3, (sp, 0x4)
 540:	3300      	movi      	r3, 0
 542:	b860      	st.w      	r3, (sp, 0)
 544:	3200      	movi      	r2, 0
 546:	3100      	movi      	r1, 0
 548:	3001      	movi      	r0, 1
 54a:	e0000000 	bsr      	0	// 0 <EPWM_OUTPUT_Configure>
	EPWM_OUTPUT_Configure(EPWM_PWM_X2OrPWM_Y2,EPWM_OUTSE_PXPYOutputDirect,EPWM_X_POLARITY_NoChange,EPWM_Y_POLARITY_NoChange,EPWM_SRCSEL_PX,0x10,0x10);		//PWM_X PWM_Y 直接输出模式,输出端电平保持不变,RED=EPMW_CLK*16=16us,FED=EPMW_CLK*16=16us	
 54e:	3310      	movi      	r3, 16
 550:	b862      	st.w      	r3, (sp, 0x8)
 552:	b861      	st.w      	r3, (sp, 0x4)
 554:	3300      	movi      	r3, 0
 556:	b860      	st.w      	r3, (sp, 0)
 558:	3200      	movi      	r2, 0
 55a:	3100      	movi      	r1, 0
 55c:	3002      	movi      	r0, 2
 55e:	e0000000 	bsr      	0	// 0 <EPWM_OUTPUT_Configure>
	//EPWM_ConfigInterrupt_CMD(EPWM2_CMPADM,ENABLE);			//使能 Count2递减CMPA匹配中断
	//EPWM_ConfigInterrupt_CMD(EPWM2_CMPBUM,ENABLE);			//使能 Count2递增CMPB匹配中断
	//EPWM_ConfigInterrupt_CMD(EPWM2_CMPBDM,ENABLE);			//使能 Count2递减CMPB配置中断
	
	//EPWM_AllConter_START();					//Count0~Count3 同时开启
	EPWM_Conter0_START();						//Count0 开启	
 562:	e0000000 	bsr      	0	// 0 <EPWM_Conter0_START>
	//EPWM_Conter1_START();						//Count1 开启
	//EPWM_Conter2_START();						//Count2 开启
	
	//EPWM_Int_Enable();						//使能 EPWM 中断向量
	
} 
 566:	1405      	addi      	sp, sp, 20
 568:	1490      	pop      	r15

0000056a <I2C_MASTER_CONFIG>:
//I2C MASTER Initial
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/	
void I2C_MASTER_CONFIG(void)
{
 56a:	14d0      	push      	r15
    I2C_DeInit();                                           //所有寄存器复位赋值
 56c:	e0000000 	bsr      	0	// 0 <I2C_DeInit>
    I2C_Master_Init(I2C_G0,FAST_MODE,0x040,0x20);           //查询方式参数配置
 570:	3320      	movi      	r3, 32
 572:	3240      	movi      	r2, 64
 574:	3101      	movi      	r1, 1
 576:	3000      	movi      	r0, 0
 578:	e0000000 	bsr      	0	// 0 <I2C_Master_Init>
	//I2C_Master_Init(I2C_G0,FAST_MODE,0x70,0x30);			//INT方式参数配置			
    //I2C_Int_Enable();                                      //I2C中断向量使能
	
}
 57c:	1490      	pop      	r15

0000057e <I2C_SLAVE_CONFIG>:
//I2C SLAVE Initial
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/	
void I2C_SLAVE_CONFIG(void)
{
 57e:	14d0      	push      	r15
 580:	1421      	subi      	sp, sp, 4
    I2C_DeInit();                                           //所有寄存器复位赋值
 582:	e0000000 	bsr      	0	// 0 <I2C_DeInit>
    I2C_Slave_Init(I2C_G2,FAST_MODE,0x4F,0x40,0xAE);        //从机地址=0xae(8bit), 快速模式, sysclock=20M, 通讯速度=sysclock/(0x4f+4)=240K
 586:	33ae      	movi      	r3, 174
 588:	b860      	st.w      	r3, (sp, 0)
 58a:	324f      	movi      	r2, 79
 58c:	3340      	movi      	r3, 64
 58e:	3101      	movi      	r1, 1
 590:	3002      	movi      	r0, 2
 592:	e0000000 	bsr      	0	// 0 <I2C_Slave_Init>
    I2C_Int_Enable();                                       //I2C中断向量使能
 596:	e0000000 	bsr      	0	// 0 <I2C_Int_Enable>
	
} 
 59a:	1401      	addi      	sp, sp, 4
 59c:	1490      	pop      	r15

0000059e <SPI_MASTER_CONFIG>:
//SPI MASTER Initial
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/	
void SPI_MASTER_CONFIG(void)
{
 59e:	14d0      	push      	r15
 5a0:	1424      	subi      	sp, sp, 16
	SPI_DeInit();
 5a2:	e0000000 	bsr      	0	// 0 <SPI_DeInit>
	SPI_NSS_IO_Init(1);
 5a6:	3001      	movi      	r0, 1
 5a8:	e0000000 	bsr      	0	// 0 <SPI_NSS_IO_Init>
	SPI_Master_Init(SPI_G1,SPI_DATA_SIZE_8BIT,SPI_SPO_0,SPI_SPH_0,SPI_LBM_0,SPI_RXIFLSEL_1_8,0,10);
 5ac:	330a      	movi      	r3, 10
 5ae:	b863      	st.w      	r3, (sp, 0xc)
 5b0:	3300      	movi      	r3, 0
 5b2:	b862      	st.w      	r3, (sp, 0x8)
 5b4:	3301      	movi      	r3, 1
 5b6:	b861      	st.w      	r3, (sp, 0x4)
 5b8:	3300      	movi      	r3, 0
 5ba:	b860      	st.w      	r3, (sp, 0)
 5bc:	3200      	movi      	r2, 0
 5be:	0409      	br      	0x5d0	// 5d0 <SPI_MASTER_CONFIG+0x32>
 5c0:	000186a0 	.long	0x000186a0
 5c4:	00002710 	.long	0x00002710
	...
 5d0:	3107      	movi      	r1, 7
 5d2:	3001      	movi      	r0, 1
 5d4:	e0000000 	bsr      	0	// 0 <SPI_Master_Init>
	//选择SPI IO group1; 发送数据大小为8BIT; SCK工作时为高电平; SCK第一个时钟沿捕捉; 串行正常输出; 接收占用1/8 FIFO中断触发断点; FSSPCLKOUT=20M/10=1M
	//SPI_ConfigInterrupt_CMD(SPI_RXIM,ENABLE);				//使能FIFO接收中断
	//SPI_Int_Enable();										//使能SPI中断向量
	
}
 5d8:	1404      	addi      	sp, sp, 16
 5da:	1490      	pop      	r15

000005dc <SPI_SLAVE_CONFIG>:
//SPI SLAVE Initial
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/	
void SPI_SLAVE_CONFIG(void)
{
 5dc:	14d0      	push      	r15
 5de:	1421      	subi      	sp, sp, 4
	SPI_DeInit();
 5e0:	e0000000 	bsr      	0	// 0 <SPI_DeInit>
	SPI_NSS_IO_Init(1);
 5e4:	3001      	movi      	r0, 1
 5e6:	e0000000 	bsr      	0	// 0 <SPI_NSS_IO_Init>
	SPI_Slave_Init(SPI_G1,SPI_DATA_SIZE_8BIT,SPI_RXIFLSEL_1_8,0,12);			
 5ea:	330c      	movi      	r3, 12
 5ec:	3201      	movi      	r2, 1
 5ee:	b860      	st.w      	r3, (sp, 0)
 5f0:	3107      	movi      	r1, 7
 5f2:	3300      	movi      	r3, 0
 5f4:	3001      	movi      	r0, 1
 5f6:	e0000000 	bsr      	0	// 0 <SPI_Slave_Init>
	//选择SPI IO group1; 发送数据大小为8BIT;接收占用1/8 FIFO中断触发断点 ;FSSPCLKOUT=20M/12=1.6M
	SPI_ConfigInterrupt_CMD(SPI_RXIM,ENABLE);				//使能FIFO接收中断
 5fa:	3101      	movi      	r1, 1
 5fc:	3004      	movi      	r0, 4
 5fe:	e0000000 	bsr      	0	// 0 <SPI_ConfigInterrupt_CMD>
	SPI_Int_Enable();										//使能SPI中断向量
 602:	e0000000 	bsr      	0	// 0 <SPI_Int_Enable>
}
 606:	1401      	addi      	sp, sp, 4
 608:	1490      	pop      	r15

0000060a <SYSCON_CONFIG>:
//syscon Functions
//EntryParameter:NONE
//ReturnValue:NONE
/*************************************************************/
void SYSCON_CONFIG(void)
{
 60a:	14d0      	push      	r15
//------SYSTEM CLK AND PCLK FUNTION---------------------------/
    SYSCON_RST_VALUE();                                                         //SYSCON所有寄存器复位赋值
 60c:	e0000000 	bsr      	0	// 0 <SYSCON_RST_VALUE>
	//SYSCON_General_CMD(ENABLE,ENDIS_IDLE_PCLK);								//SLEEP模式下PCLK使能
    SYSCON_General_CMD(ENABLE,ENDIS_ISOSC);                                     //使能/禁止内部副频
 610:	3101      	movi      	r1, 1
 612:	3001      	movi      	r0, 1
 614:	e0000000 	bsr      	0	// 0 <SYSCON_General_CMD>
    SYSCON_General_CMD(ENABLE,ENDIS_IMOSC);	                                    //使能/禁止内部主频
 618:	3102      	movi      	r1, 2
 61a:	3001      	movi      	r0, 1
 61c:	e0000000 	bsr      	0	// 0 <SYSCON_General_CMD>
	SYSCON_General_CMD(DISABLE,ENDIS_EMOSC);	                                //使能/禁止外部晶振
 620:	3108      	movi      	r1, 8
 622:	3000      	movi      	r0, 0
 624:	e0000000 	bsr      	0	// 0 <SYSCON_General_CMD>
	//SYSON_EMOSC_32k_EN();														//使能 外部晶振外接 32.768K
	SYSCON_IMOSC_SETECTE(IMOSC_SETECTE_20M);									//选择内部主频为20M
 628:	3001      	movi      	r0, 1
 62a:	e0000000 	bsr      	0	// 0 <SYSCON_IMOSC_SETECTE>
    SystemCLK_HCLKDIV_PCLKDIV_Config(SYSCLK_IMOSC,HCLK_DIV_1,PCLK_DIV_1);       //内部主振作为系统时钟，HCLK 1分频，PCLK 1分频
 62e:	3180      	movi      	r1, 128
 630:	3200      	movi      	r2, 0
 632:	4121      	lsli      	r1, r1, 1
 634:	3000      	movi      	r0, 0
 636:	e0000000 	bsr      	0	// 0 <SystemCLK_HCLKDIV_PCLKDIV_Config>
//------------  WDT FUNTION  --------------------------------/
    SYSCON_IWDCNT_Config(IWDT_TIME_1S,IWDT_INTW_DIV_1);     					//WDT溢出时间1s;WDT TEIM:1S*(1-(8-1)/8)=0.75S
 63a:	30c0      	movi      	r0, 192
 63c:	3118      	movi      	r1, 24
 63e:	4002      	lsli      	r0, r0, 2
 640:	e0000000 	bsr      	0	// 0 <SYSCON_IWDCNT_Config>
    //SYSCON_WDT_CMD(ENABLE);                                                   //禁止WDT功能
    SYSCON_WDT_CMD(DISABLE);
 644:	3000      	movi      	r0, 0
 646:	e0000000 	bsr      	0	// 0 <SYSCON_WDT_CMD>
    SYSCON_IWDCNT_Reload();                                                     //清狗
 64a:	e0000000 	bsr      	0	// 0 <SYSCON_IWDCNT_Reload>
	//SYSCON->IECR|=IWDT_INT_ST;												//使能WDT报警中断
	//SYSCON_WakeUp_Enable();													//使能syscon中断唤醒
//------------  LVD FUNTION  --------------------------------/ 
	LVR_Enable();																//Disable LVR ,上电缺省LVR Enable,
 64e:	e0000000 	bsr      	0	// 0 <LVR_Enable>
    SYSCON_LVD_Config(ENABLE_LVDEN,INTDET_LVL_2_5V,RSTDET_LVL_2_2V,ENABLE_LVD_INT);	//使能LVD LVR功能, LVD检测电压2.5V, LVR检测电压2.2V, 使能LVD中断
 652:	3380      	movi      	r3, 128
 654:	4364      	lsli      	r3, r3, 4
 656:	3200      	movi      	r2, 0
 658:	3100      	movi      	r1, 0
 65a:	3000      	movi      	r0, 0
 65c:	e0000000 	bsr      	0	// 0 <SYSCON_LVD_Config>
    //LVD_Int_Enable();															//使能LVD中断向量
}
 660:	1490      	pop      	r15

00000662 <APT32F172_init>:
//APT32F172_init                                                                  /
//EntryParameter:NONE                                                             /
//ReturnValue:NONE                                                                /
/*********************************************************************************/
void APT32F172_init(void) 
{
 662:	14d1      	push      	r4, r15
//------------------------------------------------------------/
//Peripheral clock enable and disable
//EntryParameter:NONE
//ReturnValue:NONE
//------------------------------------------------------------/
	SYSCON_WDT_CMD(DISABLE);                                        //禁止 WDT
 664:	3000      	movi      	r0, 0
 666:	e0000000 	bsr      	0	// 0 <SYSCON_WDT_CMD>
	SYSCON->PCER0=0xFFFFFFF;                                        //使能IP
 66a:	106e      	lrw      	r3, 0	// 6a0 <APT32F172_init+0x3e>
 66c:	102e      	lrw      	r1, 0xfffffff	// 6a4 <APT32F172_init+0x42>
 66e:	9340      	ld.w      	r2, (r3, 0)
 670:	b22a      	st.w      	r1, (r2, 0x28)
 672:	6d0f      	mov      	r4, r3
    SYSCON->PCER1=0xFFFFFFF;                                        //使能IP
 674:	b22d      	st.w      	r1, (r2, 0x34)
	while(!(SYSCON->PCSR0&0x1));                                    //判断IP是否使能
 676:	3101      	movi      	r1, 1
 678:	926c      	ld.w      	r3, (r2, 0x30)
 67a:	68c4      	and      	r3, r1
 67c:	3b40      	cmpnei      	r3, 0
 67e:	0ffd      	bf      	0x678	// 678 <APT32F172_init+0x16>
//------------------------------------------------------------/
//ISOSC/IMOSC/EMOSC/SYSCLK/IWDT/LVD/EM_CMFAIL/EM_CMRCV/CMD_ERR OSC stable interrupt
//EntryParameter:NONE
//ReturnValue:NONE
//------------------------------------------------------------/
	SYSCON_Int_Enable();                                             //使能SYSCON中断向量
 680:	e0000000 	bsr      	0	// 0 <SYSCON_Int_Enable>
	SYSCON->IECR=ISOSC_ST|IMOSC_ST|EMOSC_ST|SYSCLK_ST;               //使能 ISOSC时钟稳定中断,使能IMOSC 时钟稳定中断,使能EMOSC时钟稳定中断
 684:	9460      	ld.w      	r3, (r4, 0)
 686:	328b      	movi      	r2, 139
 688:	b35d      	st.w      	r2, (r3, 0x74)
	CK_CPU_EnAllNormalIrq();                                         //打开全局中断
 68a:	e0000000 	bsr      	0	// 0 <CK_CPU_EnAllNormalIrq>
	SYSCON_CONFIG();                                                 //syscon参数 初始化
 68e:	e0000000 	bsr      	0	// 60a <SYSCON_CONFIG>
	//CMP_CONFIG();													 	//CMP 初始化
	//OPAMP_CONFIG();													//OPAMP 初始化
	//ADC_CONFIG();														//ADC 初始化
	//EPWM_CONFIG();													//EPWM 初始化
	//LED_CONFIG();														//LED 初始化
	CORET_CONFIG();														//CORET 初始化 1000ms@20M
 692:	e0000000 	bsr      	0	// 72 <CORET_CONFIG>
	//GPT_CONFIG();														//GPT 初始化
	GTC_CONFIG();														//GTC 初始化  100ms@20M
 696:	e0000000 	bsr      	0	// 340 <GTC_CONFIG>
	STC16_CONFIG();													//STC16 初始化		10ms@20M
 69a:	e0000000 	bsr      	0	// 37e <STC16_CONFIG>
    //I2C_SLAVE_CONFIG();                                           	//I2C 作从机 初始化 	
	//SPI_MASTER_CONFIG();												//SPI 作主机 初始化 	
	//SPI_SLAVE_CONFIG();												//SPI 作从机 初始化  
	//UART_CONFIG();													//UART 初始化
	//USART_CONFIG();													//USART 初始化
}		
 69e:	1491      	pop      	r4, r15
 6a0:	00000000 	.long	0x00000000
 6a4:	0fffffff 	.long	0x0fffffff
